package com.gupaoedu.pattern.factory.factorymethod;

import com.gupaoedu.pattern.factory.IFood;

/**
 * 2019/5/4
 * created by chenpp
 */
public class FoodFactoryTest {
    public static void main(String[] args) {
        FoodFactory factory1 = new BreadFactory();
        FoodFactory factory2 = new MilkFactory();
        IFood food1 = factory1.product();
        IFood food2 = factory2.product();
        food1.introduce();
        food2.introduce();

    }
}
